<?php if($login==1){?>

<link type="text/css" href="<?php echo BASE_URL?>ext/js/menu/menu.css" rel="stylesheet" />
<script>
function insertItem(group_id)
{
	window.location='popup.php?page=_insert&group_id='+group_id; 
}
function deleteItem(id)
{
	if(confirm('Bạn có đồng ý xóa mục tin này không?'))
		window.location='popup.php?page=_delete&id='+id; 
}
function updateItem(id,group_id)
{
	window.location='popup.php?page=_update-by-id&id='+id+'&group_id='+group_id; 
}
</script>
<style>
	div#menu{position:fixed;top:-2px;left:0px;width:100%;z-index:9999}
	div#menu ul.menu{width:100%;padding-left:0px}
	div#menu ul li{text-align:left}
	div#menu ul li.update{width:15px;background-color:#2d2d2d;margin-top:-24px;}
	div#menu ul li.update a{}
	div#menu ul li.delete{width:15px;background-color:#2d2d2d;margin-top:-24px;margin-left:34px}
	div#menu ul li.delete a{padding-left: 0px}
	div#menu ul span.process{font-weight:bold;color:orange}	
	div#menu ul span.process:hover{color:white}	
</style>

<div id="menu">
	<ul class="menu">
		<li>
			<a href="index.php?page=trang-chu&group_id=0"><span><?php echo LTRANG_CHU?></span></a>
		</li>
		<li>
			<a href="index.php?page=gioi-thieu&group_id=0"><span><?php echo LGIOI_THIEU?></span></a>
			<a href="popup.php?page=_update-by-name&name=gioi-thieu" title='Cập nhật nội dung mục: <?php echo LGIOI_THIEU?>'><span class='process'>[!]</span></a>
		</li>
		<li>
			<a href="#" class='parent'><span><?php echo LPHU_HUYNH?></span></a>
			<a href="javascript:insertItem(1)"  title='Thêm mục tin mới cho mục: <?php echo LPHU_HUYNH?>'><span class="process">[+]</span></a>
			<ul>
				<?php echo Partial::create_menu_item(Page::fetch_pages_by_group_id(1),1);?>
			</ul>	
		</li>
		<li>
			<a href="#" class='parent'><span><?php echo LGIA_SU?></span></a>
			<a href="javascript:insertItem(2)" title='Thêm mục tin mới cho mục: <?php echo LGIA_SU?>'><span class="process">[+]</span></a>
			<ul>
				<li><a style='margin-left:48px' href='index.php?page=lop-day-hien-co'><span><?php echo LLOP_DAY_HIEN_CO?></span></a></li>
				<li class='update'>
					<a  href='javascript:insertItem(4)' title='Thêm lớp dạy mới'>
						<span class='process'>[+]</span>
					</a>
				</li>
				<?php echo Partial::create_menu_item(Page::fetch_pages_by_group_id(2),2);?>
			</ul>		
		</li>
		<li>
			<a href="index.php?page=tin-tuc"><span><?php echo LTIN_TUC?></span></a>
			<a href="javascript:insertItem(3)" title='Thêm tin tức mới'><span class="process">[+]</span></a>
		</li>
		<li>
			<a href="index.php?page=tuyen-dung&group_id=0"><span><?php echo LTUYEN_DUNG?></span></a>
			<a href="popup.php?page=_update-by-name&name=tuyen-dung" title='Cập nhật nội dung mục: <?php echo LTUYEN_DUNG?>'><span class='process'>[!]</span></a>
		</li>
		<li>
			<a href="index.php?page=lien-he"><span><?php echo LLIEN_HE?></span></a>
			<a href="popup.php?page=_update-by-name&name=lien-he" title='Cập nhật nội dung mục: <?php echo LLIEN_HE?>'><span class='process'>[!]</span></a>
		</li>
		<li style='float:right'>
			<a href="popup.php?page=_logout"><span><?php echo LLOGOUT;?></span></a>
		</li>
		<li style='float:right'>
			<a href="index.php?page=_change-password"><span><?php echo LCHANGE_PASSWORD;?></span></a>
		</li>
		<li style='float:right'>
			<a href="popup.php?page=_mode&mode=<?php echo $mode=='view'?'edit':'view';?>"><span>Đổi sang chế độ <?php echo $mode=='view'?'cập nhật':'xem';?></span></a>
		</li>
	</ul>
</div>

<div style='display:none'><div id="copyright">Copyright &copy; 2011 <a href="http://apycom.com/">Apycom jQuery Menus</a></div></div>

<?php }?>
